package base;

import java.io.IOException;
import java.net.Socket;

public class Task implements Runnable{
	private Socket client;
	private Controller controller;
	public Task(Socket client,Controller controller) throws IOException{
		this.client = client;
		this.controller = controller;
	}
	
	public void run() {
		try{
			while(true){
				controller.handleMessage(client);
			}
		}catch(Exception e){
			System.out.println("e"+e);
		}
	}
}
